16.2 Virtual Address Space

Kernel Mode Operations


The processor operates in Kernel mode when the Status register contains the Kernel-mode bit-values shown in Table 16-1.

Kernel mode virtual address space is divided into regions differentiated by the high-order bits of the virtual address, as shown in Figure 16-3.



Figure 16-3 Kernel Mode Address Space


NOTE: If ERL = 1, the selected 2 Gbyte space becomes uncached and unmapped.


32-bit Kernel Mode, User Space (kuseg)

In Kernel mode, when KX = 0 in the Status register, and the most-significant bit of the virtual address, A31, is cleared, the 32-bit kuseg virtual address space is selected; it covers the full 231 bytes (2 Gbytes) of the current user address space. The virtual address is extended with the contents of the 8-bit ASID field to form a unique virtual address.

32-bit Kernel Mode, Kernel Space 0 (kseg0)

In Kernel mode, when KX = 0 in the Status register and the most-significant three bits of the virtual address are 1002, 32-bit kseg0 virtual address space is selected; it is the 229-byte (512-Mbyte) kernel physical space. References to kseg0 are not mapped through the TLB; the physical address is selected by subtracting 0x8000 0000 from the virtual address. The K0 field of the Config register determines cacheability and coherency.

32-bit Kernel Mode, Kernel Space 1 (kseg1)

In Kernel mode, when KX = 0 in the Status register and the most-significant three bits of the 32-bit virtual address are 1012, 32-bit kseg1 virtual address space is selected; it is the 229-byte (512-Mbyte) kernel physical space.

References to kseg1 are not mapped through the TLB; the physical address is selected by subtracting 0xA000 0000 from the virtual address.

Caches are disabled for accesses to these addresses, and physical memory (or memory-mapped I/O device registers) are accessed directly.

32-bit Kernel Mode, Supervisor Space (ksseg)

In Kernel mode, when KX = 0 in the Status register and the most-significant three bits of the 32-bit virtual address are 1102, the ksseg virtual address space is selected; it is the current 229-byte (512-Mbyte) supervisor virtual space. The virtual address is extended with the contents of the 8-bit ASID field to form a unique virtual address.

References to ksseg are mapped through the TLB.

32-bit Kernel Mode, Kernel Space 3 (kseg3)

In Kernel mode, when KX = 0 in the Status register and the most-significant three bits of the 32-bit virtual address are 1112, the kseg3 virtual address space is selected; it is the current 229-byte (512-Mbyte) kernel virtual space. The virtual address is extended with the contents of the 8-bit ASID field to form a unique virtual address.

References to kseg3 are mapped through the TLB.

64-bit Kernel Mode, User Space (xkuseg)

In Kernel mode, when KX = 1 in the Status register and bits 63:62 of the 64-bit virtual address are 002, selection of the xkuseg virtual address space is dependent upon the UX and ERL bits.

The virtual address is extended with the contents of the 8-bit ASID field to form a unique virtual address.

64-bit Kernel Mode, Current Supervisor Space (xksseg)

In Kernel mode, when KX = 1 in the Status register and bits 63:62 of the 64-bit virtual address are 012, selection of the xksseg virtual address space is dependent upon the SX bit.

The virtual address is extended with the contents of the 8-bit ASID field to form a unique virtual address.

64-bit Kernel Mode, Physical Spaces (xkphys)

In Kernel mode, when KX = 1 in the Status register and bits 63:62 of the 64-bit virtual address are 102, the xkphys virtual address space is selected; it is a set of eight kernel physical spaces. Each kernel physical space contains either one or four 240-byte physical pages.

References to this space are not mapped; the physical address selected is taken directly from bits 39:0 of the virtual address. Bits 61:59 of the virtual address specify the cache algorithm, described in Chapter 4, the section titled "Cache Algorithms." If the cache algorithm is either uncached or uncached accelerated (values of 2 or 7) the space contains four physical pages; access to addresses whose bits 56:40 are not equal to 0 cause an Address Error exception. Address bits 58:57 carry the uncached attribute (described in Chapter 6, the section titled "Support for Uncached Attribute"), and are not checked for address errors.

If the cache algorithm is neither uncached nor uncached accelerated, the space contains a single physical page, as on the R4400 processor. In this case, access to addresses whose bits 58:40 are not equal to a zero cause an Address Error exception, as shown in Figure 16-4.



Figure 16-4 xkphys Virtual Address Space

64-bit Kernel Mode, Kernel Space (xkseg)

In Kernel mode, when KX = 1 in the Status register and bits 63:62 of the 64-bit virtual address are 112, the address space selected is one of the following:

64-bit Kernel Mode, Compatibility Spaces (ckseg1:0, cksseg, ckseg3)

In Kernel mode, when KX = 1 in the Status register, bits 63:62 of the 64-bit virtual address are 112, and bits 61:31 of the virtual address equal -1, the lower two bytes of address, as shown in
Figure 16-3, select one of the following 512-Mbyte compatibility spaces.




Copyright 1995, MIPS Technologies, Inc. -- 29 JAN 96


Generated with CERN WebMaker